<script lang="ts" setup>
import {onMounted, ref,defineEmits} from "vue";
import InView from "./org/components/ViewOfTable.vue";

let inView: any = ref();

let selectd = ref({
    id: null,
    name: "",
});

let emit = defineEmits(["select"]);

let select = (param: any) => {
    selectd.value = param;
    emit("select", param);
}

</script>

<template>
    <el-button
        v-if="!selectd.id"
    @click="inView.open()"
    >未选择组织</el-button>
    <el-button
        v-else
        @click="inView.open()"
    >{{selectd.name}}</el-button>
    <in-view
    ref="inView"
    @select="select"
    ></in-view>
</template>